Description
The following example shows how to retrieve a business partner record from the database. Use this sample as a basis to all business objects of master data type (not document type).
Dim RetVal As Long
Dim vBP As SAPbobsCOM.BusinessPartners
Set vBP = vCmp.GetBusinessObject(oBusinessPartners)
RetVal = vBP.GetByKey("BP00234")
   If RetVal <> 0 Then
      vCmp.GetLastError ErrCode, ErrMsg
      MsgBox "Failed to Retrieve the record " & ErrCode & " " & ErrMsg
      Exit Sub
   End If |